<?php
/* @var $this UserController */
/* @var $model User */
/* @var $form CActiveForm */
?>
<h1>Đăng ký tài khoản</h1>
<div class="form ">

<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id'=>'user-form',
	//'enableAjaxValidation'=>true,
	'enableClientValidation'=>true,
	'htmlOptions'=>array('style'=>"width:100%;")
)); ?>

	<?php echo $form->errorSummary($model); ?>
		<div class="row">
			<?php echo $form->textFieldRow($model,'username',array('size'=>50,'maxlength'=>50)); ?>
		</div>
		<div class="row">
			<?php echo $form->passwordFieldRow($model,'password',array('size'=>60,'maxlength'=>100)); ?>
		</div>
		
		<div class="row">
			<?php echo $form->passwordFieldRow($model,'confirm',array('size'=>60,'maxlength'=>100)); ?>
		</div>
	
		<div class="row">
			<?php echo $form->labelEx($model,'email'); ?>
			<?php echo $form->emailField($model,'email'); ?>
			<?php echo $form->error($model,'email'); ?>
		</div>

		<?php if(CCaptcha::checkRequirements()): ?>
		<div class="row">
			<?php $this->widget('MyCaptcha'); ?>
			<?php echo $form->textFieldRow($model,'verifyCode'); ?>
		</div>
		<?php endif; ?>
		
	
		<div class="row buttons">
			<?php $this->widget('bootstrap.widgets.TbButton', array('buttonType'=>'submit', 'label'=>'Đăng ký', 'type'=>'inverse','htmlOptions'=>array('id'=>'submit'))); ?>
		</div>
<?php $this->endWidget(); ?>

</div><!-- form -->